// 编写规则
export const rules = {
  username: [
    {
      required: true,
      message: '账号不能为空',
      trigger: 'blur'
    },
    {
      pattern: /^[a-z0-9]{5,16}$/,
      message: '用户名必须是5~16个字符的数字或字母',
      trigger: 'blur'
    }
  ],
  password: [
    {
      required: true,
      message: '密码不能为空',
      trigger: 'blur'
    },
    {
      pattern: /^[a-z0-9]{6,}$/,
      message: '最少六位的数字或字母',
      trigger: 'blur'
    }
  ],
  captchaCode: [
    {
      required: true,
      message: '必须填写',
      trigger: 'blur'
    }
  ]
}
